<template>
  <div>
    <ul>
      <li v-for="i in cate">{{ i.name }}</li>

    </ul>
    <pages :total="total" @cpage="changecpage"></pages>

  </div>
</template>

<script>
import pages from "./pages";

export default {
  components: {
    'pages': pages
  },
  name: "show_cate",
  data() {
    return {
      cate: [],
      total: 0,
      cpage: 1,
      zzz: ''
    }
  },
  methods: {
    get_cate() {
      this.$axios.get('/courses/pageM?cpage=' + this.cpage)
        .then(res => {
          this.cate = res.data.list
          this.total = res.data.total
        })
    },
    changecpage(v, zzz) {
      this.cpage = v
      this.zzz = zzz
    }
  },
  mounted() {
    this.get_cate()
  }
}
</script>

<style scoped>

</style>
